import {GET_CATEGORY_DATA} from './actionTypes'
export const loadDataSync = (data) => {
    return {type:GET_CATEGORY_DATA,data}
}
export const loadDataAsync = (dispatch) => {
    return () => {
        fetch('/mock/cookbook-category.json')
            .then(res => res.json())
            .then(result => {
                dispatch(loadDataSync(result.data.category))
            })
    }
}
